home *** CD-ROM | disk | FTP | other *** search
-
- ( ----------------------------------------------------------------------
- ( Frame Command examples
- ( To try any of these, add the following line to your r3d3:s/rpl-startup:
- ( "r3d3:rpl/framecmd.rpl" LOAD
- ( ----------------------------------------------------------------------
-
- 256 STRING sFileName
- 256 STRING sTmp
-
- ( Asks if the user wants to cancel the animation
- ( -----------------------------------------------
-
- : FcAskUser
- "CONTINUE|CANCEL" "Frame Rendered" GET_KEY
- NOT IF
- "User Break" ERROR
- ENDIF
- ;
-
- ( This converts image file rendered by given View window to jpeg file
- ( by using the public domain program 'cjpeg' and deletes the original file.
- ( Takes one parameter which is the name of the View window used for
- ( rendering to a file. Note that 'cjpeg' understands only Targa or PPM.
- ( 'cjpeg' program is is based in part on the work of the Independent
- ( JPEG Group. 'cjpeg' is included in 'Accessories' drawer of the Real 3D
- ( installation.
- ( -----------------------------------------------------------------------
-
- : FcCompress
- ( build up string 'W:Viewname->filename' for attr()
- "attr(W:%s->filename)" sTmp SPRINTF
-
- ( create actual file name
- sTmp EVAL ( filename in given View window
- "attr(A:->currentfrm)" EVAL ( current frame
- "attr(A:->format)" EVAL ( format string
- sFileName SPRINTF
-
- ( convert file
- sFileName sFileName "r3d3:accessories/cjpeg -q 80 %s %s.jpg" sTmp SPRINTF
- sTmp SYSTEM
-
- ( delete file
- sFileName "delete %s" sTmp SPRINTF
- sTmp SYSTEM
- ;
-